[Chapter 4] 4.5 Mailer Tables
Author: Bryan Costales & Eric Allman
Date: 1999-02-04T00:04:36Z

#

| Chapter 4 Configuring with m4 |

## 4.5 Mailer Tables

Mailer tables are a simple way of directing messages to different Mail Delivery Agents (MDAs) on the basis of host or domain names. For example, consider this input file (e.g., /etc/mailertable):

>     remote.foo.com  uucp-uudom:home
>     .skunkworks.foo.com   relay:secret.foo.com

Here the first line says that anything addressed to user@remote.foo.com should be sent using the uucp-uudom deilvery agent to the host named home. The second line says that any message addressed to any host within the domain .skunkworks.foo.com should be sent using the relay delivery agent to the host secret.foo.com.

You can build the database from the input file using the %makemap(1) program:

>     % makemap hash /etc/mailertable < /etc/mailertable

You declare the database for use with your .mc file, like this:

>     FEATURE(mailertable, hash /etc/mailertable)

4.4 Virtual User Tables |  | 4.6 Hints